(function(){var positionIds=['background_advadagio','wideleaderboard_advadagio','wideleaderboard2_advadagio','@BODY','mpu_advadagio','inread_advadagio'];adagioNOPrint=true; /**fmt_edidomus_async - v. 2.2 */ if (positionIds.length > 1){ _edidomus.divIdToScale = []; _edidomus.mapContainerWidth = new Map(); _edidomus.mapContentContainer = new Map(); for (var i = 0; i < positionIds.length; i++) { if (document.getElementById(positionIds[i]) !== null) { _edidomus.mapContainerWidth.set(positionIds[i], document.getElementById(positionIds[i]).clientWidth); } } } adagioNOPrint = true; var hostname = document.location.hostname; _edidomus.isScaleToApply = (hostname === "staging.quattroruote.it" || hostname === "www.quattroruote.it"); adagioNOPrint = true; var adagioBCode = '', adagioFormatIndex = 0, async = false, formatAppend = true; var isMpopOverlay = false; // ISTR_ADD var isPopOverlay = false; adagioBCode = ''; adagioContentId = ''; try { /*background*/ isMpopOverlay = isMpopOverlay || ("background" == "mpopoverlay"); // ISTR_ADD isPopOverlay = isPopOverlay || ("background" == "popoverlay"); // ISTR_ADD async = false; formatAppend = true; try{ if ("background" != "background"){ document.getElementById(positionIds[adagioFormatIndex]).innerHTML = ""; } } catch(e){} if (adagioContentId != ''){ _edidomus.mapContentContainer.set(adagioContentId, positionIds[adagioFormatIndex]); _edidomus.divIdToScale.push(adagioContentId); } }catch(e){console.log("ce "+positionIds[adagioFormatIndex] + " A");} try { if ((positionIds[adagioFormatIndex] != "@BODY") && formatAppend){ if(typeof(async)!='undefined' && async) document.getElementById(positionIds[adagioFormatIndex]).appendChild(adagioBCode); else{ document.getElementById(positionIds[adagioFormatIndex]).innerHTML += adagioBCode; } } }catch(e){ console.log("ce: "+positionIds[adagioFormatIndex] + " B");} adagioFormatIndex++; adagioBCode = ''; adagioContentId = ''; try { /*wideleaderboard*/ isMpopOverlay = isMpopOverlay || ("wideleaderboard" == "mpopoverlay"); // ISTR_ADD isPopOverlay = isPopOverlay || ("wideleaderboard" == "popoverlay"); // ISTR_ADD async = false; formatAppend = true; try{ if ("wideleaderboard" != "background"){ document.getElementById(positionIds[adagioFormatIndex]).innerHTML = ""; } } catch(e){} if (adagioContentId != ''){ _edidomus.mapContentContainer.set(adagioContentId, positionIds[adagioFormatIndex]); _edidomus.divIdToScale.push(adagioContentId); } }catch(e){console.log("ce "+positionIds[adagioFormatIndex] + " A");} try { if ((positionIds[adagioFormatIndex] != "@BODY") && formatAppend){ if(typeof(async)!='undefined' && async) document.getElementById(positionIds[adagioFormatIndex]).appendChild(adagioBCode); else{ document.getElementById(positionIds[adagioFormatIndex]).innerHTML += adagioBCode; } } }catch(e){ console.log("ce: "+positionIds[adagioFormatIndex] + " B");} adagioFormatIndex++; adagioBCode = ''; adagioContentId = ''; try { /*wideleaderboard2*/ isMpopOverlay = isMpopOverlay || ("wideleaderboard2" == "mpopoverlay"); // ISTR_ADD isPopOverlay = isPopOverlay || ("wideleaderboard2" == "popoverlay"); // ISTR_ADD async = false; formatAppend = true; try{ if ("wideleaderboard2" != "background"){ document.getElementById(positionIds[adagioFormatIndex]).innerHTML = ""; } } catch(e){} if (adagioContentId != ''){ _edidomus.mapContentContainer.set(adagioContentId, positionIds[adagioFormatIndex]); _edidomus.divIdToScale.push(adagioContentId); } }catch(e){console.log("ce "+positionIds[adagioFormatIndex] + " A");} try { if ((positionIds[adagioFormatIndex] != "@BODY") && formatAppend){ if(typeof(async)!='undefined' && async) document.getElementById(positionIds[adagioFormatIndex]).appendChild(adagioBCode); else{ document.getElementById(positionIds[adagioFormatIndex]).innerHTML += adagioBCode; } } }catch(e){ console.log("ce: "+positionIds[adagioFormatIndex] + " B");} adagioFormatIndex++; adagioBCode = ''; adagioContentId = ''; try { /*popoverlay*/ isMpopOverlay = isMpopOverlay || ("popoverlay" == "mpopoverlay"); // ISTR_ADD isPopOverlay = isPopOverlay || ("popoverlay" == "popoverlay"); // ISTR_ADD async = false; formatAppend = true; try{ if ("popoverlay" != "background"){ document.getElementById(positionIds[adagioFormatIndex]).innerHTML = ""; } } catch(e){} if (adagioContentId != ''){ _edidomus.mapContentContainer.set(adagioContentId, positionIds[adagioFormatIndex]); _edidomus.divIdToScale.push(adagioContentId); } }catch(e){console.log("ce "+positionIds[adagioFormatIndex] + " A");} try { if ((positionIds[adagioFormatIndex] != "@BODY") && formatAppend){ if(typeof(async)!='undefined' && async) document.getElementById(positionIds[adagioFormatIndex]).appendChild(adagioBCode); else{ document.getElementById(positionIds[adagioFormatIndex]).innerHTML += adagioBCode; } } }catch(e){ console.log("ce: "+positionIds[adagioFormatIndex] + " B");} adagioFormatIndex++; adagioBCode = ''; adagioContentId = ''; try { /*mpu*/ isMpopOverlay = isMpopOverlay || ("mpu" == "mpopoverlay"); // ISTR_ADD isPopOverlay = isPopOverlay || ("mpu" == "popoverlay"); // ISTR_ADD async = false; formatAppend = true; try{ if ("mpu" != "background"){ document.getElementById(positionIds[adagioFormatIndex]).innerHTML = ""; } } catch(e){} if (adagioContentId != ''){ _edidomus.mapContentContainer.set(adagioContentId, positionIds[adagioFormatIndex]); _edidomus.divIdToScale.push(adagioContentId); } }catch(e){console.log("ce "+positionIds[adagioFormatIndex] + " A");} try { if ((positionIds[adagioFormatIndex] != "@BODY") && formatAppend){ if(typeof(async)!='undefined' && async) document.getElementById(positionIds[adagioFormatIndex]).appendChild(adagioBCode); else{ document.getElementById(positionIds[adagioFormatIndex]).innerHTML += adagioBCode; } } }catch(e){ console.log("ce: "+positionIds[adagioFormatIndex] + " B");} adagioFormatIndex++; adagioBCode = ''; adagioContentId = ''; try { /*inread*/ isMpopOverlay = isMpopOverlay || ("inread" == "mpopoverlay"); // ISTR_ADD isPopOverlay = isPopOverlay || ("inread" == "popoverlay"); // ISTR_ADD async = false; formatAppend = true; try{ if ("inread" != "background"){ document.getElementById(positionIds[adagioFormatIndex]).innerHTML = ""; } } catch(e){} if (adagioContentId != ''){ _edidomus.mapContentContainer.set(adagioContentId, positionIds[adagioFormatIndex]); _edidomus.divIdToScale.push(adagioContentId); } }catch(e){console.log("ce "+positionIds[adagioFormatIndex] + " A");} try { if ((positionIds[adagioFormatIndex] != "@BODY") && formatAppend){ if(typeof(async)!='undefined' && async) document.getElementById(positionIds[adagioFormatIndex]).appendChild(adagioBCode); else{ document.getElementById(positionIds[adagioFormatIndex]).innerHTML += adagioBCode; } } }catch(e){ console.log("ce: "+positionIds[adagioFormatIndex] + " B");} adagioFormatIndex++; if(!isMpopOverlay && !isPopOverlay){ // ISTR_ADD var event = document.createEvent("Event"); event.initEvent('noAdvMpopoverlay',true,false); document.dispatchEvent(event); } if (_edidomus.isScaleToApply && positionIds.length > 1){ _edidomus.applyScale(); window.addEventListener("resize", _edidomus.scalingResizeHandler); } })()